home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / vscreen1.zip / MSMINDEM.C < prev    next >
Text File  |  1992-06-19  |  2KB  |  63 lines

  1. #include <stdio.h>
  2. #include <stdio.h>
  3. #include <dos.h>
  4. #include "vscreen.h"
  5.  
  6. extern int ScrCnt;      
  7. extern int MaxX_Text;   
  8. extern int MaxY_Text;   
  9. extern int Bordertyp;   
  10.  
  11. extern Byte mouse;
  12. struct ms_info_block extern ms_info;
  13.  
  14. void far * interrupt own_intr()
  15. {
  16.   int xs,ys;
  17.  
  18.   ms_cursor(FALSE);
  19.   ms_inform();
  20.   if ( (xs = ms_info.x) >= (MaxX_Text - 38) ) xs = MaxX_Text-40;
  21.   if ( (ys = ms_info.y) >= (MaxY_Text - 4 ) ) ys = MaxY_Text-4;
  22.   OpenWindow("HALLO",xs,ys,xs+38,ys+3,B_WHITE,BLUE,TRUE);
  23.   GoOn();
  24.   CloseWindow(ScrCnt);
  25.   ms_cursor(TRUE);
  26.   _asm  
  27.   {
  28.     mov sp,bp
  29.     pop es
  30.     pop ds 
  31.     popa
  32.     retf
  33.   }
  34. }
  35.  
  36.  
  37. void main()
  38. {
  39.   int rc,x,y;
  40.   
  41.   InitScreen("RaRi");
  42.   Cursor(NOCURS);       /* Cursor abschalten */
  43.   x=WhereX();           /* X Position merken */
  44.   y=WhereY();           /* Y Position merken */
  45.   Write_("Start Maus-Minidemo (linke Maustaste) - beenden mit ESC");
  46.   ms_reset();           /* Maus initialisieren */
  47.   ms_cursor(TRUE);      /* Mauszeiger einschalten */ 
  48.  
  49.   /* Interrupt setzen mit linker Maustaste aktiv */
  50.   ms_intr(FALSE,TRUE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,(char far *)own_intr);
  51.  
  52.   while (TRUE) 
  53.    if ( (rc = ReadKey()) == ESC)   /* Bei ESC Bearbeitung beenden */
  54.    { 
  55.      gotoxy(x,y);       /* Alte Position setzen */
  56.      Write_("Ende Maus-Minidemo .. DEMO Programm mit VSCREEN Vers. 2.10");
  57.      Cursor(NORM);      /* Cursor einschalten */
  58.      ms_cursor(FALSE);  /* Mauszeiger abschalten */
  59.      exit(0);
  60.     }
  61. }
  62.  
  63.